cmake_minimum_required(VERSION 3.14)
project(VoiceRobot)

set(CMAKE_CXX_STANDARD 14)

set(INC_DIR include)
set(LIB_DIR lib)

include_directories(${INC_DIR})
link_directories(${LIB_DIR})


add_executable(VoiceRobot
        src/main.cpp src/voice.cpp
        src/DBheaper.h)

#target_link_libraries相当于在gcc编译命令中使用-l链接外部库
target_link_libraries(VoiceRobot pthread wiringPi asound mysqlclient libmsc.so ${CMAKE_DL_LIBS} )